<template>
  <div>
    城市列表
    <van-index-bar>
      <template v-for="(item, index) in city">
        <van-index-anchor :key="index" :index="item.initial" />
        <van-cell
          v-for="(i, ikey) in item.list"
          :key="index + '-' + ikey"
          :title="i.name"
        />
      </template>
    </van-index-bar>
  </div>
</template>


<script>
import axios from "axios";
export default {
  name: "City",
  data() {
    return {
      city: [],
    };
  },
  mounted() {
    axios.get("city.json").then((res) => {
      console.log(res);
      this.city = res.data.city;
    });
  },
};
</script>


<style>
</style>